﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <GradientStopCollection x:Key="MyGlassGradientStopsResource">
        <GradientStop Color="White" Offset="0.2" />
        <GradientStop Color="Transparent" Offset="0.4" />
        <GradientStop Color="White" Offset="0.5" />
        <GradientStop Color="Transparent" Offset="0.75" />
        <GradientStop Color="White" Offset="0.9" />
        <GradientStop Color="Transparent" Offset="1.0" />
    </GradientStopCollection>

    <GradientStopCollection x:Key="MyGlassGradientCheck">
        <GradientStop Color="WHITE"    Offset="0.9" />
        <GradientStop Color="Blue" Offset="0" />
    </GradientStopCollection>

    <LinearGradientBrush x:Key="MyGlassBrushResource" 
      StartPoint="0,0" EndPoint="1,1" Opacity="1" 
      GradientStops="{StaticResource MyGlassGradientStopsResource}" />

    <LinearGradientBrush x:Key="MyGlassBrushResourceCheck" 
      StartPoint="0,0" EndPoint="0,1" Opacity="1" 
      GradientStops="{StaticResource MyGlassGradientCheck}" />

    <Style TargetType="{x:Type RadioButton}" x:Key="GlassRadioButtonStyle">
        <Setter Property="GroupName" Value="funcmain"/>
        <Setter Property="Margin" Value="0" />
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <LinearGradientBrush.GradientStops>
                        <GradientStop Offset="0.0" Color="#CCCCFF" />
                        <GradientStop Offset="1.0" Color="DarkGray" />
                    </LinearGradientBrush.GradientStops>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"  ClipToBounds="true">
                        <Rectangle x:Name="outerRectangle" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                                   Stroke="{TemplateBinding Background}" 
                                   StrokeThickness="3" Fill="Transparent"  />
                        <Rectangle x:Name="glassCube" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                   StrokeThickness="2" RadiusX="10" RadiusY="10" Opacity="0" 
                                   Fill= "{StaticResource MyGlassBrushResourceCheck}"  
                                   RenderTransformOrigin="0.5,0.5">
                            <Rectangle.Stroke>
                                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                    <LinearGradientBrush.GradientStops>
                                        <GradientStop Offset="0.0" Color="LightBlue" />
                                        <GradientStop Offset="1.0" Color="Gray" />
                                    </LinearGradientBrush.GradientStops>
                                </LinearGradientBrush>
                            </Rectangle.Stroke>
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="cubeScaleTransform" />
                                    <RotateTransform x:Name="cubeRotateTransform" />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                        <Rectangle x:Name="glassCubeSel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                                   StrokeThickness="5" RadiusX="10" RadiusY="10" Opacity="0" 
                                   Fill="Transparent" 
                                   RenderTransformOrigin="0.5,0.5" Stroke="Blue"  >
                            <Rectangle.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform x:Name="cubeSelectScale" />
                                </TransformGroup>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                        <DockPanel Margin="20">
                            <Viewbox Stretch="Uniform">
                                <ContentPresenter x:Name="myContentPresenter"  Content="{TemplateBinding  Content}" TextBlock.Foreground="Black" />
                            </Viewbox>
                        </DockPanel>
                        <Rectangle Fill="Transparent" />
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition  Property="IsMouseOver" Value="true" />
                                <Condition Property="IsChecked" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property ="Rectangle.Stroke" Value="#FF152B45" TargetName="outerRectangle" />
                            <Setter Property="Rectangle.Opacity" Value="0.8" TargetName="glassCubeSel" />
                            <Setter Property="ToolTip" Value="{Binding}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="true" />
                                <Condition Property="IsMouseOver" Value="false" />
                            </MultiTrigger.Conditions>
                            <Setter Property ="Rectangle.Stroke" Value="#FF152B45" TargetName="outerRectangle" />
                            <Setter Property="Rectangle.Opacity" Value="0.8" TargetName="glassCube" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="true" />
                                <Condition Property="IsMouseOver" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property ="Rectangle.Stroke" Value="#FF152B45" TargetName="outerRectangle" />
                            <Setter Property="Rectangle.Opacity" Value="0.8" TargetName="glassCube" />
                            <Setter Property="ToolTip" Value="{Binding}"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsChecked" Value="false" />
                                <Condition Property="IsFocused" Value="true" />
                            </MultiTrigger.Conditions>
                            <Setter Property ="Rectangle.Stroke" Value="#FF152B45" TargetName="outerRectangle" />
                            <Setter Property="Rectangle.Opacity" Value="0.8" TargetName="glassCubeSel" />
                        </MultiTrigger>
                        <EventTrigger RoutedEvent="Mouse.MouseEnter">
                            <EventTrigger.Actions>
                                <BeginStoryboard Name="mouseEnterBeginStoryboard">
                                    <Storyboard>
                                        <DoubleAnimation
                                              Storyboard.TargetName="cubeScaleTransform"
                                              Storyboard.TargetProperty="ScaleX"
                                              By="-0.1" Duration="0:0:0.5" />
                                        <DoubleAnimation                        
                                              Storyboard.TargetName="cubeScaleTransform"
                                              Storyboard.TargetProperty="ScaleY"
                                              By="-0.1" Duration="0:0:0.5" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </EventTrigger.Actions>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="Mouse.MouseLeave">
                            <EventTrigger.Actions>
                                <StopStoryboard BeginStoryboardName="mouseEnterBeginStoryboard" />
                            </EventTrigger.Actions>
                        </EventTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="{x:Type Page}"  x:Key="estiloPage">
        <Setter Property="Page.RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <EventTrigger RoutedEvent="Loaded">
                <EventTrigger.Actions >
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation                                
                                Storyboard.TargetProperty= "(Page.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                 From="0" To="1" Duration="0:0:0.5" />
                            <DoubleAnimation                                                        
                                Storyboard.TargetProperty="(Page.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                 From="0" To="1" Duration="0:0:0.5"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <Style TargetType="{x:Type Image}" x:Key="estiloimagen">
        <Setter Property="Image.RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform />
                </TransformGroup>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="true">
                <Setter Property="Opacity" Value="1.0" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="false">
                <Setter Property="Opacity" Value="0.6"/>
            </Trigger>
            <EventTrigger RoutedEvent="MouseLeftButtonDown">
                <EventTrigger.Actions >
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation                                
                                Storyboard.TargetProperty= "(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                  To="0.93" Duration="0:0:0.1" />
                            <DoubleAnimation                                                        
                                Storyboard.TargetProperty="(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                To="0.93" Duration="0:0:0.1"  />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="MouseLeftButtonUp">
                <EventTrigger.Actions >
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation                                
                                Storyboard.TargetProperty= "(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                  To="1" Duration="0:0:0.1"   />
                            <DoubleAnimation                                                        
                                Storyboard.TargetProperty="(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                To="1"   Duration="0:0:0.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
            <EventTrigger RoutedEvent="MouseLeave">
                <EventTrigger.Actions >
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation                                
                                Storyboard.TargetProperty= "(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                  To="1" Duration="0:0:0.1"   />
                            <DoubleAnimation                                                        
                                Storyboard.TargetProperty="(Image.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                To="1"   Duration="0:0:0.1" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="styFormatoGrid"  TargetType="{x:Type DataGrid}">
        <Setter Property="VerticalAlignment" Value="Top"></Setter>
        <Setter Property="HorizontalAlignment" Value="Left"></Setter>
        <Setter Property="AlternatingRowBackground" Value="#FFEBEBF7"></Setter>
        <Setter Property="SelectionMode" Value="Extended"/>
        <Setter Property="SelectionUnit" Value="CellOrRowHeader"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush" Value="Gray"></Setter>

    </Style>

    <Style x:Key="colFormatoCabeceras" TargetType="DataGridColumnHeader">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30"/>
        <Setter Property="SeparatorBrush" Value="#FF150C20"/>
        <Setter Property="Padding" Value="5,5,5,5" />
        <Setter Property="Foreground" Value="Gray"/>
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Width" Value="auto"/>
        <Setter Property="Height"  Value="auto"/>
        <!--<Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding}" TextWrapping="WrapWithOverflow" />
                </DataTemplate>
            </Setter.Value>
        </Setter>-->
    </Style>

    <Style x:Key="colFormatoCabecerasAux" TargetType="DataGridColumnHeader">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30"/>
        <Setter Property="SeparatorBrush" Value="#FF150C20"/>
        <Setter Property="Padding" Value="5,5,5,5" />
        <Setter Property="Foreground" Value="Transparent" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Width" Value="auto"/>
        <Setter Property="Height"  Value="auto"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding}" TextWrapping="WrapWithOverflow" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="colFormatoCabecerasValmer" TargetType="DataGridColumnHeader">
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Height" Value="30"/>
        <Setter Property="SeparatorBrush" Value="#FF150C20"/>
        <Setter Property="Padding" Value="5,5,5,5" />
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontSize" Value="15" />
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Width" Value="auto"/>
        <Setter Property="Height"  Value="auto"/>
        <Setter Property="Background" Value="#33AAFF"/>
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding}" TextWrapping="WrapWithOverflow" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="celdasfijas" TargetType="DataGridCell">
        <Setter Property="BorderThickness" Value="0,0,3,0"/>
        <Setter Property="BorderBrush" Value="{Binding ElementName=grdFondoInter, Path=HorizontalGridLinesBrush}"/>
    </Style>

    <Style x:Key="colText" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="VerticalAlignment" Value="Center" />
    </Style>

    <Style x:Key="colTextEdicion" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Background" Value="LightYellow"></Setter>
        <Setter Property="Foreground" Value="Black"></Setter>
    </Style>

    <Style x:Key="colTextBit" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>

    <Style x:Key="colTextBitIzq" TargetType="TextBlock">
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>

    <Style x:Key="miFontStyle" TargetType="TextBox">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontSize"  Value="14"/>
    </Style>

    <Style x:Key="styCeldaSoloLectura" TargetType="{x:Type DataGridCell}">
        <Setter Property="Background" Value="#FFCEC9FF" />
    </Style>

    <!--Para combobox-->
    <LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="WhiteSmoke" Offset="0.0"/>
                <GradientStop Color="Gray"  Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="LightGray" Offset="0.0"/>
                <GradientStop Color="#EEE" Offset="0.9"/>
                <GradientStop Color="#FFF" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="WindowBackgroundBrush" Color="WhiteSmoke" />

    <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientBrush.GradientStops>
            <GradientStopCollection>
                <GradientStop Color="#CCC" Offset="0.0"/>
                <GradientStop Color="#444" Offset="1.0"/>
            </GradientStopCollection>
        </GradientBrush.GradientStops>
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />

    <SolidColorBrush x:Key="SolidBorderBrush" Color="LightGray" />

    <SolidColorBrush x:Key="GlyphBrush" Color="#444" />

    <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="20" />
            </Grid.ColumnDefinitions>
            <Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="2" Background="Transparent" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="1" />
            <Border Grid.Column="0" CornerRadius="2,0,0,2" Margin="1" Background="{StaticResource WindowBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="0,0,0,0" />
            <Path x:Name="Arrow" Grid.Column="1" Fill="{StaticResource GlyphBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
                <Setter Property="Foreground" Value="White"></Setter>
            </Trigger>
            <Trigger Property="ToggleButton.IsChecked" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
        <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
    </ControlTemplate>

    <Style x:Key="{x:Type ComboBox}" TargetType="ComboBox">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="Foreground" Value="Blue"></Setter>
        <Setter Property="FontSize" Value="14"></Setter>
        <Setter Property="FontWeight" Value="Bold"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ComboBox">
                    <Grid>
                        <ToggleButton Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
                        </ToggleButton>
                        <ContentPresenter Name="ContentSite" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" Margin="3,3,23,3" VerticalAlignment="Center" HorizontalAlignment="Left" />
                        <TextBox x:Name="PART_EditableTextBox" Style="{x:Null}" Foreground="Blue" Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="3,3,23,3" Focusable="True"  Background="Transparent" Visibility="Hidden" IsReadOnly="{TemplateBinding IsReadOnly}"/>
                        <Popup Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsDropDownOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Slide">
                            <Grid Name="DropDown" SnapsToDevicePixels="True" MinWidth="{TemplateBinding ActualWidth}" MaxHeight="125" Background="WhiteSmoke">
                                <Border x:Name="DropDownBorder" Background="{StaticResource WindowBackgroundBrush}" BorderThickness="2" BorderBrush="{StaticResource SolidBorderBrush}"/>
                                <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True" Foreground="blue">
                                    <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                                </ScrollViewer>
                            </Grid>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Botones-->
    <Style TargetType="{x:Type Button}">
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Opacity" Value="0.6"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border Name="border" Background="{TemplateBinding Background}">
                        <ContentPresenter Name="content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                      Margin="{TemplateBinding Padding}"
                                      RecognizesAccessKey="True"
                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" Value="1.5"></Setter>
                            <Setter TargetName="content" Property="RenderTransform" >
                                <Setter.Value>
                                    <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Opacity" Value="1.5"></Setter>
                            <Setter TargetName="content" Property="RenderTransform" >
                                <Setter.Value>
                                    <ScaleTransform ScaleX=".95" ScaleY=".95" />
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                        <Trigger Property="IsFocused" Value="True">
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Para tabs-->
    <Style TargetType="{x:Type TabItem}">
        <Setter Property="FontWeight" Value="Bold" ></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid>
                        <Border Name="Border" Margin="0,0,0,0" Background="Transparent" BorderBrush="Black" BorderThickness="1,1,1,1" CornerRadius="5">
                            <ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Header" Margin="12,2,12,2" RecognizesAccessKey="True">
                                <ContentPresenter.LayoutTransform>
                                    <RotateTransform Angle="0" />
                                </ContentPresenter.LayoutTransform>
                            </ContentPresenter>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <!--<Setter Property="Panel.ZIndex" Value="100" />-->
                            <Setter TargetName="Border" Property="Background" Value="#FF6680A5" />
                            <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
                            <Setter Property="Foreground" Value="White"></Setter>
                            <Setter Property="FontWeight" Value="Bold" ></Setter>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Border" Property="Background" Value="Red" />
                            <Setter TargetName="Border" Property="BorderBrush" Value="Black" />
                            <Setter Property="Foreground" Value="WhiteSmoke" />
                            <Setter Property="FontWeight" Value="Bold" ></Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!---->
    <Style x:Key="hcs" TargetType="{x:Type GridViewColumnHeader}">
                <Setter Property="Visibility" Value="Collapsed" />
            </Style>
</ResourceDictionary>
